<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="db.js"></script>
<script>

chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
    if(request.cmd == "read_cart") {
        $.ajax({
            url: chrome.extension.getURL("cart.html"),
			dataType: "html",
            success: sendResponse
        });

    }
    else if(request.cmd == "save") {
    	insert(request.item);
    }
});
</script>
